package com.lry.basic.thread;

import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

public class TestSchedule {


    public static void main(String[] args) {
        ScheduledThreadPoolExecutor scheduledExecutorService = new ScheduledThreadPoolExecutor(1);

        scheduledExecutorService.schedule(()->{
            System.out.println(1);
        },100, TimeUnit.SECONDS);

//        Executors.newScheduledThreadPool()

    }

}
